package com.crz.server;

import com.crz.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @Description：操作员工具类
 * @Author：crz
 * @Date：2022/3/5 13:13
 */
public class AdminUtils {

    //获取当前登录操作员
    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }

}
